<template>
  <div style="padding: 10px;">
    <Row label="字段标题" :required="true">
      <a-input v-model="fieldConfig.label"/>
    </Row>

    <Row label="字段名称" :required="true">
      <a-input v-model="fieldConfig.fieldName"/>
    </Row>

    <Row label="字段标题名称">
      <a-input v-model="fieldConfig.fieldTitleName"/>
    </Row>

    <Row label="输入提示">
      <a-input v-model="fieldConfig.placeholder"/>
    </Row>

<!--    <Row label="显示格式" :required="true">-->
<!--      <a-select v-model="fieldConfig.format">-->
<!--        <a-select-option value="">无</a-select-option>-->
<!--        <a-select-option value="%">百分号</a-select-option>-->
<!--        <a-select-option value="%">无</a-select-option>-->
<!--      </a-select>-->
<!--    </Row>-->

    <Row label="范围">
      <div>
        <a-input-number v-model="fieldConfig.min_value"/>~
        <a-input-number v-model="fieldConfig.max_value"/>
      </div>
    </Row>
  </div>
</template>
<script>
import {createProps} from '@/utils';
import {createField} from '@/components/hhd/design/FormDesigner/types';
import Row from '@/components/hhd/design/FormDesigner/base/Row.vue';

function createNumberField() {
  let res = createField();
  res.component = 'number'
  return res;
}

export default {
  name: 'NumberConfig',
  components: {Row},
  props: {
    fieldConfig: createProps(Object, createNumberField),
  }
};
</script>
